package com.openlogic.gateway.config;

import org.noear.solon.annotation.Bean;
import org.noear.solon.annotation.Configuration;
import org.noear.solon.cloud.impl.CloudLoadStrategy;
import org.noear.solon.cloud.impl.CloudLoadStrategyDefault;

/**
 * 注册负载均衡器
 * <a href="https://solon.noear.org/article/478">了解 LoadBalance</a>
 * @Author: ajie
 * @CreateTime: 2024-07-29 09:21
 */
@Configuration
public class CloudLoadBalanceConfig {

    @Bean
    public CloudLoadStrategy loadStrategy() {
        // 返回负载均衡策略 提供：默认为轮询、ip希哈
        return new CloudLoadStrategyDefault();
    }

}
